# 定义诗歌内容
title = "春雨"
author = "作者: 张军"
lines = [
    "春风拂柳织烟纱，漫润千山醒物华。",
    "脉脉揉开湖面縠，轻轻点破树梢芽。",
    "垂珠檐下添清韵，敷彩园中绽艳葩。",
    "瑶草芊芊承晓露，频生绮梦向云赊。"
]

# 计算诗句的最大长度
max_line_length = max(len(line) for line in lines)

# 标题和作者可以基于比诗句更宽的宽度居中
title_width = max_line_length + 10  # 比最长诗句宽10个字符

# 居中打印标题、作者和诗句
print(title.center(title_width))
print(author.center(title_width))
print()  # 空行分隔
for line in lines:
    print(line.center(max_line_length))
